package com.gumball.context;

import com.gumball.server.GumballMachineRemote;

public class GumballMonitor {
	GumballMachineRemote gumballMachineRemote;

	public GumballMonitor(GumballMachineRemote gumballMachineRemote) {
		this.gumballMachineRemote = gumballMachineRemote;
	}

	public void report() {
		try {
			System.out.println("Gumball Machine: "
					+ gumballMachineRemote.getLocation());
			System.out.println("Current Invetory: "
					+ gumballMachineRemote.getCount() + " gumballs");
			System.out.println("Current state: "
					+ gumballMachineRemote.getState());

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
